<!DOCTYPE html>
<html>
<head>
<style>
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  padding: 12px 16px;
  z-index: 1;
}

.dropdown.b:hover .dropdown-content {
  display: block;
}
</style>
</head>
<body>

<div class="dropdown">
  <span>鼠标移入我</span>
  <div class="dropdown-content">
    <p>菜单项1</p>
    <p>菜单项2</p>
    <p>菜单项3</p>
  </div>
</div>
<h1>test</h1>
<h1>test</h1>
<h1>test</h1>
<div class="dropdown a b">
    <span>鼠标移入我</span>
    <div class="dropdown-content">
      <p>菜单项1</p>
      <p>菜单项2</p>
      <p>菜单项3</p>
    </div>
  </div>
<script src="./hover.js"></script>
</body>
</html>